ccR.Add_Rotation(
	2, -- Spec number
	"CC_DK_Frost_Solo", -- Function name
	"Frost for Levelling/Dungeons", -- Description
	"CC_DK_Frost_Talents", -- Talents
	"CC_DK_Frost_Abilities", -- Abilities
	"CC_DK_Frost_Features", -- Features
	"CC_DK_Frost_Setup" -- Setup
)
function CC_DK_Frost_Solo()
	if ccR.Target.Is.Attackable() and ccR.Player.Is.Facing("target") then
		ccR.Start_Attack()
		if ccR.Player.IsInCombat() then
		-- Features -- Death_Knight\Functions.lua
			if ccR.Var("Dark_Succor") then ccR.Death_Knight.Dark_Succor(ccR.Var("Dark_Succor_Health")) end
			if ccR.Var("Empower_Rune_Weapon") then if (not ccR.Var("Empower_Rune_Weapon_BossOnly") or ccR.Var("Empower_Rune_Weapon_BossOnly") and (ccR.Player.Is.Solo() or ((ccR.Player.Is.InDungeon() or ccR.Player.Is.InRaid()) and ccR.Target.Is.Boss()))) then ccR.Death_Knight.Empower_Rune_Weapon() end end
			if ccR.Var("Icebound_Fortitude") then ccR.Death_Knight.Icebound_Fortitude(ccR.Var("Icebound_Fortitude_Health")) end
			if ccR.Var("Anti_Magic_Shell") then ccR.Death_Knight.Anti_Magic_Shell() end

		-- Abilities -- Death_Knight\Functions.lua
			if ccR.Var("Pillar_of_Frost") then if ccR.Spell.IsReady(PILLAR_OF_FROST) and ccR.Target.Distance() <= 10 then ccR.Cast.Spell(PILLAR_OF_FROST) end end
			if ccR.Var("Mind_Freeze") then ccR.Death_Knight.Mind_Freeze(ccR.Var("Mind_Freeze_Count")) end
			if ccR.Var("Strangulate") then ccR.Death_Knight.Strangulate(ccR.Var("Strangulate_Count")) end 
			if ccR.Var("Soul_Reaper") then ccR.Death_Knight.Features.Soul_Reaper(35) end
			if ccR.Var("Blood_Boil_Spread") then ccR.Death_Knight.Blood_Boil_Spread(ccR.Var("Blood_Boil_Spread_Count")) end
		-- Talents -- Death Knight\Talents.lua
			-- Tier 1
			if ccR.Var("Plague_Leech") then ccR.Death_Knight.Talent.Plague_Leech() end
			if ccR.Var("Unholy_Blight") then  ccR.Death_Knight.Talent.Unholy_Blight(ccR.Var("Unholy_Blight_Count")) end
			-- Tier 3
			if ccR.Var("Lichborne") then ccR.Death_Knight.Talent.Lichborne() end
			-- Tier 4
			if ccR.Var("Blood_Tap") then ccR.Death_Knight.Talent.Blood_Tap(ccR.Var("Blood_Tap_Count")) end
			-- Tier 5
			if ccR.Var("Death_Pact") then ccR.Death_Knight.Talent.Death_Pact(ccR.Var("Death_Pact_Health")) end
			if ccR.Var("Death_Siphon") then ccR.Death_Knight.Talent.Death_Siphon(ccR.Var("Death_Siphon_Health")) end
			if ccR.Var("Conversion") then ccR.Death_Knight.Talent.Conversion(ccR.Var("Conversion_Health")) end
			-- Tier 6
			if ccR.Var("Gorefiends_Grasp") then ccR.Death_Knight.Talent.Gorefiends_Grasp(ccR.Var("Gorefiends_Grasp_Count")) end
			if ccR.Var("Remoreseless_Winter") then ccR.Death_Knight.Talent.Remorseless_Winter(ccR.Var("Remoreseless_Winter_Count")) end
			if ccR.Var("Desecrated_Ground") then ccR.Death_Knight.Talent.Desecrated_Ground() end
			-- Tier 7
			if ccR.Var("Breath_of_Sindragosa") then ccR.Death_Knight.Talent.Breath_of_Sindragosa(ccR.Var("Breath_of_Sindragosa_Count")) end
		end
		-- AoE Rotation
		if (ccR.Var("AutoAoE") and not ccR.Target.Is.Boss() and ((not ccR.Player.Has.Glyph(GLYPH_OF_BLOOD_BOIL) and ccR.Target.Count(10)) or (ccR.Player.Has.Glyph(GLYPH_OF_BLOOD_BOIL) and ccR.Target.Count(15))) >= ccR.Var("AoECount")) or ccR.Var("ManualAoE") then
			ccR.Death_Knight.Death_And_Decay(ccR.Var("AoECount"))
			if ccR.Spell.CanAttack(FROST_STRIKE) and ccR.Player.Runic_Power() >= 75 then ccR.Cast.Attack(FROST_STRIKE) return
			elseif ccR.Spell.CanAttack(HOWLING_BLAST) then ccR.Cast.Attack(HOWLING_BLAST) return
			elseif ccR.Spell.CanAttack(FROST_STRIKE) then ccR.Cast.Attack(FROST_STRIKE) return
			elseif ccR.Spell.CanAttack(PLAGUE_STRIKE) then ccR.Cast.Attack(PLAGUE_STRIKE) return
			end
		-- End of AoE
		return
		end		

		-- Single Target Rotation
		if ccR.Var("Death_Grip") then if ((ccR.Var("Death_Grip_InLFG") and	(ccR.Player.Is.InDungeon() or ccR.Player.Is.InRaid() or ccR.Player.Is.Solo())) or (not ccR.Var("Death_Grip_InLFG") and ccR.Player.Is.Solo())) then ccR.Death_Knight.Death_Grip() end	end
		if OffhandHasWeapon() then
			-- Dual-Wielding
			if ccR.Target.Is.Attackable() then
				if ccR.Spell.CanAttack(FROST_STRIKE) and ccR.Player.Runic_Power() >= 75 then ccR.Cast.Attack(FROST_STRIKE)
				elseif ccR.Spell.CanAttack(FROST_SOUL_REAPER) and ccR.Target.Health() <= 35 then ccR.Cast.Attack(FROST_SOUL_REAPER)
				end
				if ccR.Player.Has.Talent(NECROTIC_PLAGUE) then
					if ccR.Spell.CanAttack(OUTBREAK) and not ccR.Target.Has.MyDebuff(NECROTIC_PLAGUE_DEBUFF) then ccR.Cast.Attack(OUTBREAK) end
					if ccR.Spell.CanAttack(HOWLING_BLAST) and not ccR.Target.Has.MyDebuff(NECROTIC_PLAGUE_DEBUFF) then ccR.Cast.Attack(HOWLING_BLAST) end
					if ccR.Spell.CanAttack(PLAGUE_STRIKE) and not ccR.Target.Has.MyDebuff(NECROTIC_PLAGUE_DEBUFF) then ccR.Cast.Attack(PLAGUE_STRIKE) end
				else
					if ccR.Spell.CanAttack(OUTBREAK) and (not ccR.Target.Has.MyDebuff(FROST_FEVER) or not ccR.Target.Has.MyDebuff(BLOOD_PLAGUE)) then ccR.Cast.Attack(OUTBREAK) end
					if ccR.Spell.CanAttack(HOWLING_BLAST) and (not ccR.Spell.CanAttack(OUTBREAK) and not ccR.Target.Has.MyDebuff(FROST_FEVER)) then ccR.Cast.Attack(HOWLING_BLAST) end
					if ccR.Spell.CanAttack(PLAGUE_STRIKE) and (not ccR.Spell.CanAttack(OUTBREAK) and not ccR.Target.Has.MyDebuff(BLOOD_PLAGUE)) then ccR.Cast.Attack(PLAGUE_STRIKE) end
				end
				if ccR.Spell.CanAttack(FROST_STRIKE) and (ccR.Player.Has.Buff(KILLING_MACHINE) or ccR.Player.Runic_Power() >= 70) then ccR.Cast.Attack(FROST_STRIKE)
				elseif ccR.Spell.CanAttack(HOWLING_BLAST) and ccR.Player.Has.Buff(FREEZING_FOG) then ccR.Cast.Attack(HOWLING_BLAST)
				elseif ccR.Spell.CanAttack(HOWLING_BLAST) then ccR.Cast.Attack(HOWLING_BLAST) 
				end
				if ccR.Var("Death_Strike") and ccR.Player.Health() <= ccR.Var("Death_Strike_Health") and ccR.Spell.CanAttack(DEATH_STRIKE) and ((ccR.Var("Death_Strike_InLFG") and (ccR.Player.Is.InDungeon() or ccR.Player.Is.InRaid() or ccR.Player.Is.Solo())) or (not ccR.Var("Death_Strike_InLFG") and ccR.Player.Is.Solo())) then ccR.Cast.Attack(DEATH_STRIKE) else if ccR.Spell.CanAttack(OBLITERATE) then ccR.Cast.Attack(OBLITERATE) end end
			end
		else
		-- 2H
			if ccR.Target.Is.Attackable() then
				if ccR.Spell.CanAttack(FROST_STRIKE) and ccR.Player.Runic_Power() >= 75 then ccR.Cast.Attack(FROST_STRIKE)
				elseif ccR.Spell.CanAttack(FROST_SOUL_REAPER) and ccR.Target.Health() <= 35 then ccR.Cast.Attack(FROST_SOUL_REAPER)
				end
				if ccR.Player.Has.Talent(NECROTIC_PLAGUE) then
					if ccR.Spell.CanAttack(OUTBREAK) and not ccR.Target.Has.MyDebuff(NECROTIC_PLAGUE_DEBUFF) then ccR.Cast.Attack(OUTBREAK) end
					if ccR.Spell.CanAttack(HOWLING_BLAST) and not ccR.Spell.CanAttack(NECROTIC_PLAGUE_DEBUFF) then ccR.Cast.Attack(HOWLING_BLAST) end
					if ccR.Spell.CanAttack(PLAGUE_STRIKE) and not ccR.Target.Has.MyDebuff(NECROTIC_PLAGUE_DEBUFF) then ccR.Cast.Attack(PLAGUE_STRIKE) end
				else
					if ccR.Spell.CanAttack(OUTBREAK) and (not ccR.Target.Has.MyDebuff(FROST_FEVER) or not ccR.Target.Has.MyDebuff(BLOOD_PLAGUE)) then ccR.Cast.Attack(OUTBREAK) end
					if ccR.Spell.CanAttack(HOWLING_BLAST) and (not ccR.Spell.CanAttack(OUTBREAK) and not ccR.Target.Has.MyDebuff(FROST_FEVER)) then ccR.Cast.Attack(HOWLING_BLAST) end
					if ccR.Spell.CanAttack(PLAGUE_STRIKE) and (not ccR.Spell.CanAttack(OUTBREAK) and not ccR.Target.Has.MyDebuff(BLOOD_PLAGUE)) then ccR.Cast.Attack(PLAGUE_STRIKE) end
				end
				if ccR.Spell.CanAttack(FROST_STRIKE) and ccR.Player.Runic_Power() >= 75 then ccR.Cast.Attack(FROST_STRIKE) end
				if ccR.Var("Death_Strike") and ccR.Player.Health() <= ccR.Var("Death_Strike_Health") and ccR.Spell.CanAttack(DEATH_STRIKE) and ((ccR.Var("Death_Strike_InLFG") and (ccR.Player.Is.InDungeon() or ccR.Player.Is.InRaid() or ccR.Player.Is.Solo())) or (not ccR.Var("Death_Strike_InLFG") and ccR.Player.Is.Solo())) then ccR.Cast.Attack(DEATH_STRIKE) else if ccR.Spell.CanAttack(OBLITERATE) then ccR.Cast.Attack(OBLITERATE) end end
				if ccR.Spell.CanAttack(FROST_STRIKE) and not ccR.Player.Has.Buff(KILLING_MACHINE) then ccR.Cast.Attack(FROST_STRIKE)
				elseif ccR.Spell.CanAttack(HOWLING_BLAST) and ccR.Player.Has.Buff(FREEZING_FOG) then ccR.Cast.Attack(HOWLING_BLAST)
				elseif ccR.Spell.CanAttack(FROST_STRIKE) then ccR.CastAttack(FROST_STRIKE)
				elseif (not ccR.Spell.CanAttack(FROST_STRIKE) and not ccR.Spell.CanAttack(OBLITERATE)) and ccR.Spell.CanAttack(HOWLING_BLAST) then ccR.Cast.Attack(HOWLING_BLAST) 
				end
			end
		end
	end
end